/* eslint-disable */
// let domain = "http://192.168.5.123:8080/suyun-admin";
// let domain = "http://192.168.5.151:8080/suyun-admin";
let domain = "http://localhost:8080/suyun-admin";

if (process.env.NODE_ENV === "production") {
  domain = "http://39.106.136.226:8080/suyun-admin";
}

export default {
  captcha: `${domain}/captcha.jpg`,
  login: `${domain}/sys/login`,
  dictionary: `${domain}/sys/dictionary/parents`,
  production:{
    add: `${domain}/sys/dictionary/add`,
    edit: `${domain}/sys/dictionary/edit`,
    del: `${domain}/sys/dictionary/del`,
  },
  todo: `${domain}/sys/dashboard/count`,
  user: {
    list: `${domain}/sys/user/list`,
    info: `${domain}/sys/user/info`
  },
  menu: {
    list: `${domain}/sys/menu/list`,
    nav: `${domain}/sys/menu/nav`,
    save: `${domain}/sys/menu/save`,
    update: `${domain}/sys/menu/update`,
    remove: `${domain}/sys/menu/delete`,
  },
  product: {
    list: `${domain}/sys/product/list`,
    factory : `${domain}/sys/dictionary/parents`,
    off: `${domain}/sys/product/off`,
    info: `${domain}/sys/product/info`,
    edit: `${domain}/sys/product/edit`,
    select: `${domain}/sys/user/businessuser`
  },
  sale: {
    order: `${domain}/sys/order/list`,
    price: `${domain}/bidding/product/list`,
    info:  `${domain}/bidding/product/info`,
    list:  `${domain}/bidding/record/list`,
    deal: `${domain}/bidding/record/deal`,
    fail: `${domain}/bidding/record/fail`,
    add: `${domain}/bidding/product/add`
  },
  system: {
    role: {
      list: `${domain}/sys/role/list`,
      remove: `${domain}/sys/role/delete`,
      save: `${domain}/sys/role/save`,
      update: `${domain}/sys/role/update`,
      select: `${domain}/sys/role/select`,
      info: `${domain}/sys/role/info`,
    },
    dept: {
      list: `${domain}/sys/dept/list`,
      select: `${domain}/sys/dept/select`,
      info: `${domain}/sys/dept/info`,
      save: `${domain}/sys/dept/save`,
      update: `${domain}/sys/dept/update`,
      remove: `${domain}/sys/dept/delete`,
    },
    user: {
      list: `${domain}/sys/user/list`,
      info: `${domain}/sys/user/info`,
      save: `${domain}/sys/user/save`,
      update: `${domain}/sys/user/update`,
      remove: `${domain}/sys/user/delete`,
      password: `${domain}/sys/user/password`,
      resetPass: `${domain}/sys/user/resetPassword`,
    },
    conf:{
      gets: `${domain}/sys/config/global/get`,
      edit: `${domain}/sys/config/global/edit`
    }
  },
  customer: {
    all: `${domain}/sys/customer/all`,
    add: `${domain}/sys/customer/add`,
    get: `${domain}/sys/customer`,
    update: `${domain}/sys/customer/update`,
    success: `${domain}/sys/customer/success`,
    fail: `${domain}/sys/customer/fail`,
    frozen: `${domain}/sys/customer/frozen`,
    checkPhone: `${domain}/sys/customer/checkPhone`,
    checkName: `${domain}/sys/customer/checkName`,
    editCheckName: `${domain}/sys/customer/editCheckName`,
  },
  article: {
    list: `${domain}/sys/article/list`,
    info: `${domain}/sys/article/info`,
    add: `${domain}/sys/article/add`,
    edit: `${domain}/sys/article/edit`,
    remove: `${domain}/sys/article/del`,
    up: `${domain}/sys/article/up`,
    down: `${domain}/sys/article/down`,
  },
  financing: {
    list: `${domain}/sys/financing/list`,
    info: `${domain}/sys/financing/info`,
    add: `${domain}/sys/financing/addlog`,
  },
  account: {
    page: `${domain}/sys/account/page`,
    accoun: `${domain}/sys/account/accountdet`
  },
  category: {
    list: `${domain}/sys/category/list`,
    info: `${domain}/sys/category/info`,
    add: `${domain}/sys/category/add`,
    edit: `${domain}/sys/category/edit`,
    remove: `${domain}/sys/category/del`,
  },
  finance:{
    recharge: `${domain}/sys/apply/applypage`,
    find: `${domain}/sys/apply/find`,
    withdraw: `${domain}/sys/apply/withdraw`,
    succe: `${domain}/sys/apply/success`,
    failure: `${domain}/sys/apply/failure`,
    frost: `${domain}/sys/apply/frost`,
    unfrost: `${domain}/sys/apply/unfrost`
  },
  oss: {
    upload: `${domain}/sys/oss/upload`,
  },
  area: {
    list: `${domain}/sys/area/list`
  },
  order: {
    edit: `${domain}/sys/order`,
    audit: id => `${domain}/sys/order/${id}/audit`,
    cancel: id => `${domain}/sys/order/${id}/cancel`,
    payment: id => `${domain}/sys/order/${id}/payment`,
    deliver: id => `${domain}/sys/order/${id}/deliver`,
    receive: id => `${domain}/sys/order/${id}/receive`,
  },
};
